import request from '@/utils/request'

export function list (data) {
  return request({
    url: '/pc/user/listByPage',
    method: 'post',
    data
  })
}

export function detail (id) {
  return request({
    url: `/api/pc/user/user${id}`,
    method: 'get'
  })
}

export function vipConfigList (data) {
  return request({
    url: '/pc/vip/product/listByPage',
    method: 'post',
    data
  })
}

export function vipConfigAdd (data) {
  return request({
    url: '/pc/vip/product/add',
    method: 'post',
    data
  })
}

export function userPassword (data) {
  return request({
    url: '/pc/user/updatePwd',
    method: 'post',
    data
  })
}

export function ownerPassword (data) {
  return request({
    url: '/pc/user/updateSelfPwd',
    method: 'post',
    data
  })
}

export function vipConfigUpdate (data) {
  return request({
    url: '/pc/vip/product/update',
    method: 'put',
    data
  })
}

export function vipConfigActive (ids) {
  return request({
    url: '/pc/vip/product/active',
    method: 'post',
    data: ids
  })
}

export function vipConfigFrozen (ids) {
  return request({
    url: '/pc/vip/product/frozen',
    method: 'post',
    data: ids
  })
}

export function dicList (data) {
  return request({
    url: '/pc/dict/listDict',
    method: 'post',
    data
  })
}

export function dicAdd (data) {
  return request({
    url: '/pc/dict/add',
    method: 'post',
    data
  })
}

export function dicUpdate (data) {
  return request({
    url: '/pc/dict/update',
    method: 'put',
    data
  })
}

export function dicDelete (data) {
  return request({
    url: '/pc/dict/delete',
    method: 'delete',
    data
  })
}

export function rewardList (data) {
  return request({
    url: '/pc/reward/listByPage',
    method: 'post',
    data
  })
}

export function rewardAdd (data) {
  return request({
    url: '/pc/reward/add',
    method: 'post',
    data
  })
}

export function rewardUpdate (data) {
  return request({
    url: '/pc/reward/update',
    method: 'put',
    data
  })
}

export function rewardActive (ids) {
  return request({
    url: '/pc/reward/active',
    method: 'post',
    data: ids
  })
}

export function rewardFrozen (ids) {
  return request({
    url: '/pc/reward/frozen',
    method: 'post',
    data: ids
  })
}

export function rewardInfoDetail (id) {
  return request({
    url: `/pc/reward/getRewardInfoDetail?id=${id}`,
    method: 'get'
  })
}


